<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8" %>
<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset=UTF-8>
    <meta name=”viewport” content=”width=device-width, initial-scale=1″/>
    <title>零售平台</title>

    <link rel="stylesheet"
          href="http://cdn.static.runoob.com/libs/bootstrap/3.3.7/css/bootstrap.min.css">
    <link rel="stylesheet" href="jbox/Skins/Gray/jbox.css"/>

    <link href="css/bootstrap-datetimepicker.min.css" rel="stylesheet"
          media="screen">
    <link href="https://cdn.bootcss.com/select2/3.5.1/select2-bootstrap.css"
          rel="stylesheet">
    <link
            href="https://cdn.bootcss.com/bootstrap-select/2.0.0-beta1/css/bootstrap-select.css"
            rel="stylesheet">
    <link
            href="https://cdn.bootcss.com/bootstrap-table/1.11.1/bootstrap-table.css"
            rel="stylesheet">
    <link
            href="https://cdn.bootcss.com/x-editable/1.5.1/bootstrap3-editable/css/bootstrap-editable.css"
            rel="stylesheet">
    <link href="css/rawgit-bootstrap-editable.css" rel="stylesheet"/>
    <script src="myjs/path.js"></script>
    <script
            src="https://cdn.bootcss.com/backbone.paginator/2.0.6/backbone.paginator.js"></script>
    <script src="https://cdn.bootcss.com/jquery/1.9.1/jquery.js"></script>
    <script
            src="http://cdn.static.runoob.com/libs/bootstrap/3.3.7/js/bootstrap.min.js"></script>
    <script src="myjs/sale.js"></script>
    <script type="text/javascript" src="js/bootstrap-datetimepicker.js"
            charset="UTF-8"></script>
    <script type="text/javascript" src="js/bootstrap-datetimepicker.fr.js"
            charset="UTF-8"></script>
    <script type="text/javascript"
            src="js/bootstrap-datetimepicker.zh-CN.js" charset="UTF-8"></script>
    <script type="text/javascript" src="js/jquery.jqprint-0.3.js"></script>
    <script src="http://www.jq22.com/jquery/jquery-migrate-1.2.1.min.js"></script>
    <script
            src="https://cdn.bootcss.com/bootstrap-table/1.11.1/bootstrap-table.js"></script>
    <script
            src="https://cdn.bootcss.com/bootstrap-table/1.11.1/locale/bootstrap-table-zh-CN.js"></script>

    <script
            src="https://cdn.bootcss.com/bootstrap-select/2.0.0-beta1/js/bootstrap-select.js"></script>
    <script type="text/javascript" src="jbox/jquery.jBox-2.3.min.js"></script>
    <script type="text/javascript" src="jbox/i18n/jquery.jBox-zh-CN.js"></script>
    <script src="js/bootstrap-table-editable.js"></script>
    <script src="js/rawgit-bootstrap-editable.js"></script>

    <style type="text/css">
        .anniu:hover {
            background: #6EC89B;
            cursor: pointer;
            color: white;
        }

        @media screen {
            #divOP {
                display: none
            }

            #divVip {
                display: none
            }
        }

        #xuliehua {
            list-style: none;
            display: none;
        }

        #fu {
            position: absolute;
            width: 245px;
            height: 100px;
            /* border:1px solid #F00; */
            height: 100px;
            top: 34px;
            overflow: auto;
            z-index: -999;
        }

        #fu ul {
            border: 1px solid #D3D3D3;
            padding: 0;
            margin: 0;
            background-color: white;
        }

        #fu ul li {
            height: 25px;
        }

        #fu ul li:hover {
            background-color: #B39999;
            cursor: pointer;
        }

        .mCSB_inside > .mCSB_container {
            margin-right: 13px;
        }

        #myModal-5 {
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translateX(-50%) translateY(-50%);
        }
    </style>

</head>
<body>
<input id='jgid' type='hidden' value='${info.jgid}'>
<div class="row"
     style="width: auto; height: auto; padding: 0; margin-left: 0; margin-right: 0;">
    <div class="col-md-6"
         style="padding: 0; width: 410px; border-right: solid 3px #787878;">
        <div id="shang"
             style="min-height: 480px; height: 60%; overflow-y: auto;">
            <ul id="myTab" class="nav nav-tabs" id="tab"
                style="background-color: #5C5C5C;">
                <li class="rem active"><a href="#home" data-toggle="tab"
                                          onclick="rems(this)"> 1 </a></li>
                <li id="title"><a href="#" class="glyphicon glyphicon-plus"
                                  onclick="addcard()"> </a></li>
                <li><a href="#" class="glyphicon glyphicon-minus"
                       onclick="removecard()"> </a></li>
            </ul>
            <div id="myTabContent" class="tab-content">
                <div class="rem tab-pane fade in active" id="home">
                    <div class="table-responsive"></div>

                    <div class="table-responsive2"></div>
                </div>
            </div>
        </div>
        <div
                style="border-top: solid 3px rgb(110, 200, 155); height: 220px; background-color: #E2E2E2; padding: 15px">
            <div style="height: 10px;"></div>
            <div style="">
                <div class="input-group">
                    <div class="input-icon-group">
                        <input id="shangpinbianhao" type="text" class="form-control "
                               placeholder="请输入商品编号"/>
                        <script>
                            $("#shangpinbianhao").blur(function () {
                                setTimeout(function () {
                                    $("#xuliehua").hide();
                                    $("#fu").css("z-index", -1);
                                }, 150);
                            });
                            $("#shangpinbianhao")
                                .keyup(
                                    function (event) {
                                        if (event.keyCode == 13) {
                                            if ($("#shangpinbianhao").val() == "") {
                                                $("#shishou").focus();
                                            } else {
                                                addcar();
                                            }
                                        } else {
                                            var product = $("#shangpinbianhao").val().trim();
                                            $
                                                .ajax({
                                                    url: path + '/production/findsale/list.do',
                                                    dataType: 'json',
                                                    data: {
                                                        product: product
                                                    },
                                                    success: function (data) {
                                                        var data = data.data
                                                        var sts = ''
                                                        for (var i = 0; i < data.length; i++) {
                                                            sts += "<li onclick=dianji(this)>"
                                                                + data[i].productCode
                                                                + "</li>"
                                                        }
                                                        $("#xuliehua").html(sts)
                                                        $("#xuliehua").show();
                                                        $("#fu").css("z-index", 999);
                                                    }
                                                })
                                        }
                                    });
                            function dianji(tar) {
                                $("#shangpinbianhao").val($(tar).text());
                                $("#shangpinbianhao").focus();
                                $("#xuliehua").hide();
                                $("#fu").css("z-index", -1);
                            }
                        </script>
                    </div>
                    <div id="fu" class="mCustomScrollbar"
                         data-mcs-theme="inset-3-dark">
                        <ul id="xuliehua">

                        </ul>
                    </div>
                    <span class="input-group-btn">
							<button id="addcar"
                                    class="btn btn-primary glyphicon glyphicon-shopping-cart"
                                    type="button" style="width: 120px;" onclick="addcar()">&nbsp;添加</button>
						</span>
                </div>
                <div style="height: 10px;"></div>
                <table style="margin: 0 auto;">
                    <tr style="height: 40px">
                        <td style="color: #555555;">
                            <form class="form-inline" onsubmit="return false">
                                <div class="form-group">
                                    <div class="input-group">
                                        <div class="input-group-addon">折扣：</div>
                                        <input onchange="tongyizekou()" type="text"
                                               class="form-control" id="tongyi" value="1"/>
                                    </div>
                                </div>
                            </form>
                        </td>
                        <td style="color: #555555;">
                            <form class="form-inline" onsubmit="return false">
                                <div class="form-group">
                                    <div class="input-group">
                                        <div class="input-group-addon">应收：</div>
                                        <input style="background-color: white" onchange="moling()"
                                               type="text" class="form-control" id="zongjiage"
                                               placeholder="">
                                        <div class="input-group-addon">元</div>
                                    </div>
                                </div>
                            </form>
                        </td>
                    </tr>

                    <tr>
                        <td style="color: #555555;">
                            <form class="form-inline" onsubmit="return false">
                                <div class="form-group">
                                    <div class="input-group">
                                        <div class="input-group-addon">实收：</div>
                                        <input onchange="zhaoling()"
                                               onkeyup="value=value.replace(/[^\d.]/g,'')" type="text"
                                               class="form-control" id="shishou"/>
                                        <div class="input-group-addon">元</div>
                                    </div>
                                </div>
                            </form>
                        </td>
                        <td style="color: #555555;">
                            <form class="form-inline" onsubmit="return false">
                                <div class="form-group">
                                    <div class="input-group">
                                        <div class="input-group-addon">找零：</div>
                                        <input style="background-color: white" type="text"
                                               class="form-control" id="zhaoling" placeholder="" disabled>
                                        <div class="input-group-addon">元</div>
                                    </div>
                                </div>
                            </form>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <button id="" style="width: 184px; height: 45px;"
                                    class="glyphicon glyphicon-user anniu" onclick="opendMo()">
                                <span style="display: none" id="huiid">-1</span><span
                                    style="display: none" id="zk">1</span><span id="huiming">匿名</span>
                            </button>
                        </td>
                        <td>
                            <button id="save"
                                    style="width: 184px; min-width: 184px; height: 45px;"
                                    class="glyphicon glyphicon-ok anniu" onclick="opendzhifu()">
                                确认
                            </button>
                        </td>
                    </tr>
                </table>
            </div>
        </div>
    </div>
    <!-- 销售记录部分 -->
    <div class="col-md-6" id="you" style="padding: 0; width: 100%">
        <ul id="myTabs" class="nav nav-tabs" id="tabe"
            style="background-color: #5C5C5C;">
            <li class="active1"><a onclick="initial()" href="#hom1"
                                   data-toggle="tab" style="color: skyblue;"
                                   class="glyphicon glyphicon-th-list"> 销售记录</a></li>
            <li><a href="#ios" data-toggle="tab" style="color: skyblue;"
                   class="glyphicon glyphicon-inbox" onclick="initialStore()"> 库存</a></li>
            <div style="float: right; margin-top: 10px; margin-right: 5px">
                <span style="color:white">导购员：</span> <select
                    id="daogouyuan"
                    style="width:90px;background-color: #5C5C5C;color:white;outline: none;border: none;">

            </select>
                <a href="#" style="color: white" id="username"> 收银员：${info.nikeName}</a>
                | <a href="/erp/user/loginouts.do" style="color: white">安全退出</a>
            </div>
        </ul>

        <div class="tab-content">
            <div class="tab-pane fade in active1" id="hom1">
                <form class="form-inline" onsubmit="return false"
                      style="margin: 15px">

                    <div class="form-group">
                        出库类型:
                        <div class="form-group">
                            <select id="chukuleixing" class="form-control" id="zhuangtai"
                                    style="width: 80px;">
                                <option value="-1">全部</option>
                                <option value="0">销售</option>
                                <option value="1">退货</option>
                            </select>
                        </div>
                        <label>日期从:</label>
                        <div class="input-group date form_date" data-date=""
                             data-date-format="yyyy-MM-dd" data-link-field="dtp_input2"
                             data-link-format="yyyy-mm-dd">
                            <input style="width: 100px" trigger="" data-toggle="popover"
                                   data-placement="top" id="qtime" data-content="请输入正确的日期"
                                   class="form-control" type="text" value=""> <span class="input-group-addon"><span
                                class="glyphicon glyphicon-calendar"></span></span>
                        </div>
                        &nbsp;-&nbsp;
                        <div class="input-group date form_date " data-date=""
                             data-date-format="yyyy-MM-dd" data-link-field="dtp_input2"
                             data-link-format="yyyy-mm-dd">
                            <input style="width: 100px" trigger="" data-toggle="popover"
                                   data-placement="top" id="htime" data-content="请输入正确的日期"
                                   class="form-control" type="text" value=""> <span
                                class="input-group-addon"><span
                                class="glyphicon glyphicon-calendar"></span></span>
                        </div>
                        <script type="text/javascript">
                            $('.form_date').datetimepicker({
                                minView: "month",
                                language: 'zh-CN',
                                pickDate: true,
                                todayBtn: 1,
                                autoclose: 1,
                                format: "yyyy-mm-dd"
                            });
                        </script>
                        <div class="form-group" style="padding: 0; margin: 0">
                            <select id="fenlei" class="form-control">
                                <option value="0">单号</option>
                                <option value="1">款号</option>
                                <option value="2">客户</option>
                            </select> <input id="chukudanhao" type="text" class="form-control"
                                             placeholder="请输入查询关键词"/>
                            <script type="text/javascript">
                                $("#chukudanhao").keyup(function (event) {
                                    if (event.keyCode == 13) {
                                        initial();
                                    }
                                })
                            </script>
                        </div>
                        <button
                                class="btn btn-info btn-search glyphicon glyphicon-search"
                                onclick="initial()">查找
                        </button>
                    </div>
                    <div style="float: right; font-size: 18px">
                        <Strong>当天净销售额:</Strong><span id="xiaoshou"></span>
                    </div>
                </form>
                <table class="table" id="cusTable">
                </table>
            </div>
            <div class="tab-pane fade in" id="ios">
                <form class="form-inline" onsubmit="return false"
                      style="margin: 15px">
                    <div class="form-group">
                        <div class="form-group">
                            <input id="shangpinbianhaostore" type="text"
                                   class="form-control" placeholder="请输入商品编号"/>
                            <script type="text/javascript">
                                $("#shangpinbianhaostore").keyup(
                                    function (event) {
                                        if (event.keyCode == 13) {
                                            initialStore()
                                        }
                                    })
                            </script>
                        </div>
                        <button
                                class="btn btn-info btn-search glyphicon glyphicon-search"
                                onclick="initialStore()">查找
                        </button>
                    </div>
                </form>
                <table id="tbodystore" class="table"></table>
            </div>
        </div>
    </div>


    <!-- 模态框（Modal） -->
    <div class="modal fade" id="myModal" tabindex="-1" role="dialog"
         aria-labelledby="myModalLabels" aria-hidden="true">
        <div class="modal-dialog">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal"
                            aria-hidden="true">×
                    </button>
                    <h4 class="modal-title" id="myModalLabels">警告</h4>
                </div>
                <div class="modal-body">购物车有物品，是否确认删除！</div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
                    <button type="button" class="btn btn-primary" onclick="remove()">确认</button>
                </div>
            </div>
            <!-- /.modal-content -->
        </div>
        <!-- /.modal-dialog -->
    </div>
    <!-- /.modal -->


    <!-- 模态框2（Modal） -->
    <div class="modal fade" id="myModala" tabindex="-2" role="dialog"
         aria-labelledby="myModalLabel" aria-hidden="true">
        <div class="modal-dialog" style="margin-top: 40px; width: 100%;">
            <div class="modal-content">
                <div class="modal-body " style="height: 100%">
                    <div>
                        <table style="margin: 5px auto; width: 70%;">
                            <tr>
                                <td align="left">
                                    <button class="btn btn-default"
                                            class="close" data-dismiss="modal" aria-hidden="true">&lt;&lt;&nbsp;取消
                                    </button>
                                </td>
                                <td align="center">
                                    <form class="form-inline" onsubmit="return false">
                                        <div class="form-group" style="margin: 15px;">
                                            <div class="form-group" style="margin-right: -20px">
                                                <input id="huiyuanmingc" placeholder="请输入会员名称"
                                                       class="form-control" style="width: 30%; min-width: 150px">
                                                <input id="dianhua" placeholder="请输入会员电话"
                                                       class="form-control" style="width: 30%; min-width: 150px">
                                            </div>
                                            <button
                                                    class="btn btn-info btn-search glyphicon glyphicon-search"
                                                    onclick="initialVip()">查找
                                            </button>
                                        </div>
                                    </form>
                                </td>
                                <td align="right">
                                    <button
                                            class="btn btn-primary glyphicon glyphicon-user glyphicon-plus"
                                            onclick="changevip()">+
                                    </button>
                                </td>
                            </tr>
                        </table>
                    </div>
                    <div id="xiugai"
                         style="margin: 5px auto; width: 70%; padding: 5px; display: none">
                        <div>
                            <button id="huiyuansave" onclick="savevip()"
                                    class="btn btn-success glyphicon glyphicon-star">保存
                            </button>
                            &nbsp;
                            <button onclick="$('#xiugai').css('display','none'); "
                                    class="btn btn-warning glyphicon glyphicon-remove">取消
                            </button>
                        </div>
                        <form class="form-inline" onsubmit="return false"
                              style="margin: 5px auto;">
                            <span id="vipid" style="display: none"></span>
                            <div class="form-group" style="margin-right: 10px">
                                <label for="huiyuanname">会员名称:</label> <input type="text"
                                                                              trigger="" data-toggle="popover"
                                                                              data-content="请输入会员名称"
                                                                              data-placement="top" class="form-control"
                                                                              id="huiyuanname"
                                                                              placeholder="">
                            </div>
                            <div class="form-group" style="margin-left: -8px">
                                <label for="phone">联系方式:</label> <input type="tel" trigger=""
                                                                        data-toggle="popover" data-content="请输入正确的联系方式"
                                                                        data-placement="top" class="form-control"
                                                                        id="phone"
                                                                        placeholder="">
                            </div>
                            <div class="form-group" style="margin-left: 0" id="chong">
                                <label for="czje">充值金额:</label> <input trigger=""
                                                                       data-toggle="popover" data-content="请输入正确充值金额"
                                                                       data-placement="top" class="form-control"
                                                                       id="czje"
                                                                       placeholder="">
                            </div>
                            <br>
                            <div class="form-group" style="margin-top: 5px">
                                <label for="huiyuanshengri">会员生日:</label>
                                <div class="input-group date form_date " data-date=""
                                     data-date-format="yyyy-MM-dd" data-link-field="dtp_input2"
                                     data-link-format="yyyy-mm-dd">
                                    <input trigger="" data-toggle="popover" data-placement="top"
                                           id="huiyuanshengri" data-content="请输入正确的日期"
                                           class="form-control" type="text" value=""> <span
                                        class="input-group-addon"><span
                                        class="glyphicon glyphicon-calendar"></span></span>
                                </div>
                            </div>
                            <script type="text/javascript">
                                $('.form_date').datetimepicker({
                                    minView: "month",
                                    language: 'zh-CN',
                                    pickDate: true,
                                    todayBtn: 1,
                                    autoclose: 1,
                                    format: "yyyy-mm-dd"
                                });
                            </script>
                            <div class="form-group" style="margin-left: 10px;">
                                折扣:<input id="vipzk" data-toggle="popover"
                                          data-content="折扣只能为0~1之间的小数" class="form-control" type="text"
                                          style="width: 80px"> 性别: <select id="sex"
                                                                           class="electpicker show-tick form-control">
                                <option value="0">男</option>
                                <option value="1">女</option>
                            </select>
                                <!-- <label class="radio-inline"> <input type="radio"
                                    name="optionsRadios" value="0" checked="checked"> 男
                                </label> <label class="radio-inline" style="margin-right: 0px"><input
                                    type="radio" name="optionsRadios" value="1"> 女 </label>  -->

                            </div>
                        </form>
                    </div>
                    <div style="width: 80%; margin: 0 auto">
                        <table class="table  table-responsive" id="vip_table">


                        </table>
                    </div>
                </div>
            </div>
            <!-- /.modal-content -->
        </div>
        <!-- /.modal-dialog -->
    </div>
    <!-- /.modal -->


    <div class="modal fade" id="myModalg" tabindex="-1" role="dialog"
         aria-labelledby="myModalLabel" aria-hidden="true">
        <div class="modal-dialog">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal"
                            aria-hidden="true">×
                    </button>
                    <h4>提示</h4>
                </div>
                <div class="modal-body">购物车至少保留1个</div>
            </div>
            <!-- /.modal-content -->
        </div>
        <!-- /.modal-dialog -->
    </div>
    <!-- /.modal -->

    <!-- 会员充值模态框（Modal） -->
    <div class="modal fade" id="myModal-2" tabindex="-1" role="dialog"
         aria-labelledby="myModalLabelsea" aria-hidden="true">
        <div class="modal-dialog">
            <div class="modal-content">
                <div class="modal-header">
                    <span id="vipczid" style="display: none"></span>
                    <button type="button" class="close" data-dismiss="modal"
                            aria-hidden="true">×
                    </button>
                    <h4 class="modal-title" id="myModalLabelsea">提示</h4>
                </div>
                <div class="modal-body">
                    <input id="chongzhiqian" placeholder="请输入充值金额" trigger=""
                           data-toggle="popover" data-content="请输入有效的数字金额"
                           data-placement="top" class="form-control"
                           style="width: 40%; min-width: 150px">
                    <script type="text/javascript">
                        $("#chongzhiqian").keyup(function (event) {
                            if (event.keyCode == 13) {
                                $("#czan").focus();
                            }
                        })
                    </script>
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-default"
                            data-dismiss="modal2" onclick="$('#myModal-2').modal('hide')">取消
                    </button>
                    <button type="button" id="czan" class="btn btn-primary"
                            onclick="chongzhiqian()">确认
                    </button>
                </div>
            </div>
            <!-- /.modal-content -->
        </div>
        <!-- /.modal-dialog -->
    </div>

</div>
<!-- 打印充值 -->
<div id="divVip">
    <div style="width: 100%; font-family: 宋体;">
        <table id='vipses' style='font-size: 1px; width: 100%;'>
            <tbody>

            </tbody>
        </table>
        <table width='100%' style='font-size: 1px;'>
            <tr>
                <td>
                    <div
                            style='width: 100%; border-top: 1px dashed black; margin-top: 8px; margin-bottom: 8px'></div>
                </td>
            </tr>
            <tr>
                <td>&nbsp;&nbsp;此票由客户保存,如有任何</td>
            </tr>
            <tr>
                <td>问题请联系我们</td>
            </tr>
        </table>
    </div>
</div>

<!-- 打印 -->

<div id="divOP">
    <div style="width: 100%; font-family: SimHei;">

        <table id='heard' width='100%'>


        </table>


        <table id='body' width='100%' style='font-size: 1px;'>
            <thead>
            <tr>
                <td style='width: 60px'>货号</td>
                <td style='width: 60px'>数量</td>
                <td style='width: 45px'>单价</td>
                <td style='width: 45px'>金额</td>
            </tr>
            </thead>
            <tbody>

            </tbody>

            <tfoot>

            </tfoot>
        </table>


        <table width='100%' style='font-size: 1px;'>
            <tr>
                <td>
                    <div
                            style='width: 100%; border-top: 1px dashed black; margin-top: 8px; margin-bottom: 8px'></div>
                </td>
            </tr>

            <tr>
                <td align='center'>请妥善保管好购物凭证</td>

            </tr>
            <tr>
                <td colspan='4' align='center'>谢谢惠顾！</td>

            </tr>

            <tr>
                <td style='font-size: 1px; font-weight: 900' colspan='4'
                    align='center'>三日内凭购物小票可调换
                </td>
            </tr>
            <tr>
                <td style='font-size: 1px; font-weight: 900' colspan='4'
                    align='center'>(不影响二次销售) <br/>
                </td>
            </tr>
            <tr>
                <td style='font-size: 1px'>注:以上价格四舍五入保留整数 <br/>
                </td>
            </tr>
        </table>
    </div>
</div>

<!-- <div class="alert alert-danger fade in ">
    充值失败!请刷新后重试 <a href="#" class="close" data-dismiss="alert">×</a>
    jbox
</div> -->
<div class="modal fade" id="myModal-5" tabindex="-2" role="dialog"
     aria-labelledby="myModalLabela" aria-hidden="true">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal"
                        aria-hidden="true">×
                </button>
                <h4 class="modal-title" id="myModalLabela">请选择支付方式</h4>
            </div>
            <div class="modal-body">
                <button type="button" id="xianjinzhifu"
                        class="btn btn-success btn-lg glyphicon glyphicon-yen"
                        onclick="addChuKu(0)">现金支付
                </button>
                <button type="button"
                        class="btn btn-info btn-lg glyphicon glyphicon-credit-card"
                        onclick="addChuKu(1)" id="huiyuankazhifu">会员卡支付
                </button>
            </div>
            <div class="modal-footer">
					<span style="float: left">卡上余额:<i id="kayue"></i>元<small
                            id="tishiyu">&nbsp;余额不足请先<a href="#"
                                                        onclick="dakaichongzhi()">充值</a></small>
					</span>
                <button type="button" class="btn btn-default "
                        data-dismiss="modal2" onclick="$('#myModal-5').modal('hide')">取消
                </button>
            </div>
        </div>
    </div>
</div>

<!--零售退货  -->

<div class="modal fade" id="myModalTuihuo" tabindex="-5" role="dialog"
     data-backdrop="false" aria-labelledby="myModalLabel"
     aria-hidden="true">
    <div class="modal-dialog" style="margin-top: 40px; width: 100%;">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal"
                        aria-hidden="true">×
                </button>
                <h4 class="modal-title" id="myModalLabel">零售退货</h4>
            </div>
            <div class="modal-body">
                <form class="form-inline" onsubmit="return false"
                      style="margin: 15px; font-size: 16px">
                    <div class="form-group">
                        <table>
                            <tr>
                                <td><b>销售时订单号:</b></td>
                                <td><span id="chukudanhaoid" style="display: none"></span><span
                                        id="tuiHuoDanhao"></span></td>
                            </tr>
                            <tr>
                                <td><b>会员名称:</b></td>
                                <td><span id="wanglaidanwei" style="display: none"></span><span
                                        id="tuiVipName"></span></td>
                            </tr>
                            <tr>
                                <td><b>支付方式:</b></td>
                                <td><span id="tuiZhifu"></span></td>
                            </tr>

                            <tr>
                                <td><b>请选择退货商品:</b></td>
                                <td>
                                    <div class="form-group">
                                        <select id="tuohuoKuanhao" class="form-control selectpicker"
                                                data-live-search='true' style="width: 250px;">
                                        </select>
                                    </div>
                                    <button type="button" class="btn btn-info "
                                            onclick="addTuihuo()">添加
                                    </button>
                                </td>
                            </tr>

                        </table>

                    </div>
                </form>
                <table class="table  table-responsive" id="tuiHuos">

                </table>

            </div>
            <div class="modal-footer">
                <form class="form-inline" onsubmit="return false"
                      style="margin: 15px">
                    <%-- <span style="float: left"><small>(总价格-当时抹零)=应退金额</small></span>--%> <span
                        style="font-size: 12px; color: red">注意：退款时如是会员卡支付,会退款到会员卡上</span>
                    <div class="form-group">
                        <%--抹零:--%><input id="moling" class="form-control"
                                          style="width: 30%; min-width: 150px" value="0.00" readonly type="hidden">
                        应退:<input id="yingtui" class="form-control"
                                  style="width: 30%; min-width: 150px" readonly>
                        <button type="button" class="btn btn-info " id="queRen"
                                onclick="addTuihuoChu()">确定
                        </button>
                        <button type="button" class="btn btn-warning "
                                data-dismiss="modal" onclick="$('#myModalTuihuo').modal('hide')">取消
                        </button>
                    </div>

                </form>
            </div>
        </div>
    </div>
</div>

</body>

</html>
<script type="text/javascript">
    $(function () {
        $.ajax({
            url: path + '/user/list/myself.do',
            type: 'post',
            dataType: 'json',
            success: function (data) {
                if (data.code == 200) {

                    var str = '';
                    for (i = 0; i < data.data.length; i++) {
                        str += '<option value="' + data.data[i].id + '">' + data.data[i].nikeName + '</option>';
                    }
                    $("#daogouyuan").html(str);
                    $("#daogouyuan").val(data.rows);
                } else {
                    $.jBox.messager(data.msg, "提示", 2000, {
                        width: 350,
                        height: 100,
                        icon: 'error',
                        showType: 'show'
                    });
                }
            }
        })
    });


    var date = new Date();
    var year = date.getFullYear();
    var month = date.getMonth() + 1;
    var day = date.getDate();
    var end = year + '-' + month + '-' + day;
    $("#qtime").val(end);
    $('#htime').val(end);
    initial();
    /*退货  */
    function initialTuohuo() {
        $("#tuiHuos").bootstrapTable('destroy');
        $('#tuiHuos').bootstrapTable({
            //url: '', //请求后台的URL（*）
            method: 'get', //请求方式（*）
            //toolbar: false, //工具按钮用哪个容器
            striped: true, //是否显示行间隔色
            dataType: "json",
            cache: false, //是否使用缓存，默认为true，所以一般情况下需要设置一下这个属性（*）
            pagination: false, //是否显示分页（*）
            sortable: false, //是否启用排序
            sidePagination: "server", //服务端请求, //分页方式：client客户端分页，server服务端分页（*）
            showColumns: false,
            strictSearch: false,
            clickToSelect: true, //是否启用点击选中行
            showColumns: false, // 开启自定义列显示功能
            //showRefresh: true, //是否显示刷新按钮
            //minimumCountColumns: 2, //最少允许的列数
            //clickToSelect: true, //是否启用点击选中行
            //height: 500, //行高，如果没有设置height属性，表格自动根据记录条数觉得表格高度
            uniqueId: "productionDetailsId", //每一行的唯一标识，一般为主键列
            //showToggle: true, //是否显示详细视图和列表视图的切换按钮
            cardView: false, //是否显示详细视图
            detailView: false, //是否显示父子表
            height: document.documentElement.clientHeight - 400,
            responseHandler: function (data) {
                return {
                    "rows": data
                }
            },
            columns: [{
                field: 'productionDetailsId',
                title: 'id',
                visible: false
            }, {
                field: 'productCode',
                title: '商品编号',
                align: 'center'
            }, {
                field: 'productName',
                title: '商品名称',
                align: 'center'
            }, {
                field: 'color',
                title: '颜色',
                align: 'center'
            }, {
                field: 'size',
                title: '尺码',
                align: 'center'
            }, {
                field: 'pinpai',
                title: '商品品牌',
                align: 'center'
            }, {
                field: 'price',
                title: '铭牌价/¥',
                align: 'center'
            }, {
                field: 'zekou',
                title: '零售折扣',
                align: 'center',
                formatter: function (value, row, index) {
                    return (row.danjia / row.price).toFixed(2)
                }
            }, {
                field: 'ketuishuliang',
                title: '可退数量',
                align: 'right',
                width: 80,
                visible: true,
                formatter: function (value, row, index) {
                    return Math.abs(value);
                }
            }, {
                field: 'shuliang',
                title: '数量/件&nbsp;&nbsp;&nbsp;<span class="glyphicon glyphicon-pencil"></span>',
                align: 'center',
                editable: true
            }, {
                field: 'danjia',
                title: '实际单价/¥&nbsp;&nbsp;&nbsp;<span class="glyphicon glyphicon-pencil"></span>',
                align: 'center',
                editable: true,
                formatter: function (value, row, index) {
                    if (value != null) {
                        return (value - 0).toFixed(2);
                    }
                }
            }, {
                field: 'shijizongjia',
                title: '实际总价/¥',
                align: 'center',
                formatter: function (value, row, index) {
                    return (row.danjia * row.shuliang).toFixed(2)
                }
            }, {
                field: 'quantity',
                title: '操作',
                align: 'center',
                formatter: function (value, row, index) {
                    return '<button type="button" class="btn btn-danger btn-xs" onclick="tuiRemove(\'' + row.productionDetailsId + '\')">删除</button>'
                }
            }],
            onEditableSave: function (field, row, oldValue, $el) {
                var yzsl = /^\+?[1-9][0-9]*$/;// 判断是否为正整数
                var yzdj = /^[0-9]\d*(\.\d+)?$/ // 判断必须大于1的正数；

                if (field == "shuliang") {
                    if (!yzsl.test(row.shuliang)) {
                        jBox.tip("输入不合法!", 'error');
                        row.shuliang = oldValue;
                    }

                    if (Math.abs(row.shuliang - 0) > Math.abs(row.ketuishuliang - 0)) {
                        jBox.tip("已超出退货数量，请核对数量!", 'info');
                        row.shuliang = oldValue;
                    }
                }
                if (field == "danjia" && !yzdj.test(row.danjia)) {

                    jBox.tip("输入不合法!", 'error');
                    row.danjia = oldValue
                }

                $table = $('#tuiHuos').bootstrapTable({});
                $table.bootstrapTable('updateRow', {index: row.rowId, row: row});
                tuiYingtui();

            }
        });
    }

    /*会员  */
    function initialVip() {
        $("#vip_table").bootstrapTable('destroy');
        $('#vip_table').bootstrapTable({
            url: path + '/vip/list.do', //请求后台的URL（*）
            method: 'get', //请求方式（*）
            //toolbar: false, //工具按钮用哪个容器
            striped: true, //是否显示行间隔色
            dataType: "json",
            cache: false, //是否使用缓存，默认为true，所以一般情况下需要设置一下这个属性（*）
            pagination: true, //是否显示分页（*）
            sortable: false, //是否启用排序
            sidePagination: "server", //服务端请求, //分页方式：client客户端分页，server服务端分页（*）
            pageNumber: 1, //初始化加载第一页，默认第一页
            pageSize: 10, //每页的记录行数（*）
            showColumns: false,
            pageList: [10, 20, 30], //可供选择的每页的行数（*）
            strictSearch: false,
            clickToSelect: false, //是否启用点击选中行
            showColumns: false, // 开启自定义列显示功能
            //showRefresh: true, //是否显示刷新按钮
            //minimumCountColumns: 2, //最少允许的列数
            //height: 500, //行高，如果没有设置height属性，表格自动根据记录条数觉得表格高度
            uniqueId: "ID", //每一行的唯一标识，一般为主键列
            showToggle: false, //是否显示详细视图和列表视图的切换按钮
            cardView: false, //是否显示详细视图
            detailView: false, //是否显示父子表
            height: document.documentElement.clientHeight - 400,
            queryParams: function (params) {
                //这里的键的名字和控制器的变量名必须一直，这边改动，控制器也需要改成一样的
                var temp = {
                    page: (params.offset / params.limit) + 1,
                    rows: params.limit,
                    huiyuanming: $("#huiyuanmingc").val().trim(),
                    phone: $("#dianhua").val(),
                    state: 0
                };
                return temp;
            }, //传递参数（*）
            responseHandler: function (data) {
                return {
                    "total": data.total,
                    "rows": data.rows
                }
            },
            columns: [{
                field: 'id',
                title: 'id',
                visible: false
            }, {
                field: 'huiyuanming',
                title: '会员名称',
                align: 'center'
            }, {
                field: 'balance',
                title: '余额',
                align: 'center',
                formatter: function (value, row, index) {
                    if (row.id == -1) {
                        return "-";
                    } else if (value != null) {
                        return value.toFixed(2);
                    }
                }
            }, {
                field: 'vipzk',
                title: '默认折扣',
                align: 'center'
            }, {
                field: 'yue',
                title: '消费金额',
                align: 'center',
                formatter: function (value, row, index) {
                    if (row.id == -1) {
                        return "-";
                    } else if (value != null) {
                        return value.toFixed(2);
                    }
                }
            }, {
                field: 'jifen',
                title: '会员积分',
                align: 'center',
                formatter: function (value, row, index) {
                    if (row.id == -1) {
                        return "-";
                    } else if (value != null) {
                        return value.toFixed(2);
                    }
                }
            }, {
                field: 'phone',
                title: '手机号码',
                align: 'center',
                formatter: function (value, row, index) {
                    if (row.id == -1) {
                        return "-";
                    } else {
                        return value;
                    }
                }
            }, {
                field: 'shengri',
                title: '会员生日',
                align: 'center',
                formatter: function (value, row, index) {
                    if (row.id == -1) {
                        return "-";
                    } else {
                        return value;
                    }
                }
            }, {
                field: 'xingbie',
                title: '性别',
                align: 'center',
                formatter: function (value, row, index) {
                    if (row.id == -1) {
                        return "-";
                    } else if (value == 0) {
                        return "男";
                    } else if (value == 1) {
                        return "女";
                    }
                }
            }, {
                field: 'quantity',
                title: '操作',
                align: 'center',
                formatter: function (value, row, index) {
                    if (row.id == -1) {
                        return '<button type="button" class="btn btn-info btn-xs" onclick="xuanze(\'' + row.id + '\',\'' + row.huiyuanming + '\',' + row.vipzk + ')">选择会员</button>';
                    } else {
                        return '<button type="button" class="btn btn-info btn-xs" onclick="xuanze(\'' + row.id + '\',\'' + row.huiyuanming + '\',' + row.vipzk + ')">选择会员</button>&nbsp;&nbsp<button type="button" class="btn btn-warning btn-xs" onclick="changevip(\'' + row.id + "\'," + "'" + row.huiyuanming + "'" + "," + "'" + row.phone + "'" + "," + "'" + row.shengri + "'" + "," + "'" + row.xingbie + "'" + "," + row.vipzk + ')">修改</button>&nbsp;&nbsp<button type="button" class="btn btn-success btn-xs" onclick="chongqian(\'' + row.id + '\')">充值</button>'
                    }

                }
            }],
        });
    }


    function initialStore() {
        $("#tbodystore").bootstrapTable('destroy');
        $('#tbodystore').bootstrapTable({
            url: path + '/store/list.do', //请求后台的URL（*）
            method: 'get', //请求方式（*）
            //toolbar: false, //工具按钮用哪个容器
            striped: true, //是否显示行间隔色
            dataType: "json",
            cache: false, //是否使用缓存，默认为true，所以一般情况下需要设置一下这个属性（*）
            pagination: true, //是否显示分页（*）
            sortable: false, //是否启用排序
            sidePagination: "server", //服务端请求, //分页方式：client客户端分页，server服务端分页（*）
            pageNumber: 1, //初始化加载第一页，默认第一页
            pageSize: 10, //每页的记录行数（*）
            showColumns: false,
            pageList: [10, 19, 30], //可供选择的每页的行数（*）
            strictSearch: false,
            clickToSelect: true, //是否启用点击选中行
            showColumns: false, // 开启自定义列显示功能
            height: document.documentElement.clientHeight - 180,
            //showRefresh: true, //是否显示刷新按钮
            //minimumCountColumns: 2, //最少允许的列数
            //clickToSelect: true, //是否启用点击选中行
            //height: 500, //行高，如果没有设置height属性，表格自动根据记录条数觉得表格高度
            uniqueId: "ID", //每一行的唯一标识，一般为主键列
            //showToggle: true, //是否显示详细视图和列表视图的切换按钮
            cardView: false, //是否显示详细视图
            detailView: false, //是否显示父子表
            queryParams: function (params) {
                //这里的键的名字和控制器的变量名必须一直，这边改动，控制器也需要改成一样的
                var temp = {
                    page: (params.offset / params.limit) + 1,
                    rows: params.limit,
                    productCode: $("#shangpinbianhaostore").val().trim(),
                    leixing: 0
                };
                return temp;
            }, //传递参数（*）
            responseHandler: function (data) {
                return {
                    "total": data.total,
                    "rows": data.rows
                }
            },
            columns: [{
                field: 'id',
                title: 'id',
                visible: false
            }, {
                field: 'productName',
                title: '商品名'
            }, {
                field: 'productCode',
                title: '商品编号'
            }, {
                field: 'price',
                title: '铭牌价/元',
                align: 'right',
                formatter: function (value, row, index) {
                    if (value != null) {
                        return value.toFixed(2)
                    }
                }
            }, {
                field: 'season',
                title: '季节'
            }, {
                field: 'color',
                title: '颜色'
            }, {
                field: 'size',
                title: '尺码',
                align: 'right'
            }, {
                field: 'shuliang',
                title: '库存数量',
                align: 'right'
            }],
        });
    }


    /*表格销售记录序列化  */
    function initial() {
        $("#cusTable").bootstrapTable('destroy');
        $('#cusTable').bootstrapTable({
            url: path + '/chuku/sale/list.do', //请求后台的URL（*）
            method: 'get', //请求方式（*）
            //toolbar: false, //工具按钮用哪个容器
            striped: true, //是否显示行间隔色
            dataType: "json",
            cache: false, //是否使用缓存，默认为true，所以一般情况下需要设置一下这个属性（*）
            pagination: true, //是否显示分页（*）
            sortable: false, //是否启用排序
            sidePagination: "server", //服务端请求, //分页方式：client客户端分页，server服务端分页（*）
            pageNumber: 1, //初始化加载第一页，默认第一页
            pageSize: 15, //每页的记录行数（*）
            showColumns: false,
            pageList: [10, 15, 30], //可供选择的每页的行数（*）
            strictSearch: false,
            clickToSelect: true, //是否启用点击选中行
            showColumns: false, // 开启自定义列显示功能
            height: document.documentElement.clientHeight - 150,
            //showRefresh: true, //是否显示刷新按钮
            //minimumCountColumns: 2, //最少允许的列数
            //clickToSelect: true, //是否启用点击选中行
            //height: 500, //行高，如果没有设置height属性，表格自动根据记录条数觉得表格高度
            uniqueId: "ID", //每一行的唯一标识，一般为主键列
            //showToggle: true, //是否显示详细视图和列表视图的切换按钮
            cardView: false, //是否显示详细视图
            detailView: true, //是否显示父子表
            queryParams: function (params) {
                //这里的键的名字和控制器的变量名必须一直，这边改动，控制器也需要改成一样的
                var temp = {
                    page: (params.offset / params.limit) + 1,
                    rows: params.limit,
                    chukudanhao: $("#chukudanhao").val(),
                    startTime: $("#qtime").val(),
                    endTime: $("#htime").val() + " 23:59:59",
                    fenlei: $("#chukuleixing").val(),
                    findStyle: $("#fenlei").val()
                };
                return temp;
            }, //传递参数（*）
            responseHandler: function (data) {
                return {
                    "total": data.total,
                    "rows": data.rows
                }
            },
            columns: [{
                field: 'id',
                title: 'id',
                visible: false
            }, {
                field: 'chukudanhao',
                title: '出库单号'
            }, {
                field: 'wanglaidanwei',
                title: '往来单位id',
                visible: false
            }, {
                field: 'wldwName',
                title: '客户'
            }, {
                field: 'phone',
                title: '联系方式'
            }, {
                field: 'zshuliang',
                title: '总件数',
                align: 'right',
                formatter: function (value, row, index) {
                    return Math.abs(value)
                }
            }, {
                field: 'zongjia',
                title: '总金额',
                align: 'right',
                formatter: function (value, row, index) {
                    return Math.abs(value).toFixed(2)
                }
            }, {
                field: 'zhidanrenName',
                title: '销售员',
                align: 'center'
            }, {
                field: 'chukushijian',
                title: '零售时间',
                align: 'center'
            }, {
                field: 'fenlei',
                title: '出库类型',
                align: 'center',
                formatter: function (value, row, index) {
                    if (value == 0) {
                        return '销售'
                    } else {
                        return '退货'
                    }
                }
            }, {
                field: 'zhifu',
                title: '支付方式',
                align: 'center',
                formatter: function (value, row, index) {
                    if (value == 0) {
                        return '现金支付'
                    } else {
                        return '会员卡支付'
                    }
                }
            }/*, {
             field: '',
             title: '退货数量',
             align: 'center',
             visible: false
             }*/, {
                field: '',
                title: '操作',
                align: 'center',
                formatter: function (value, row, index) {
                    if (row.fenlei == 0) {
                        if (row.yituihuo >= row.zongjianshu) {
                            return '<button type="button"  class="btn btn-info btn-xs pin" onclick="printer(\'' + row.id + '\')">打印</button>'
                        } else {
                            return '<button type="button" class="btn btn-info btn-xs pin" onclick="printer(\'' + row.id + '\')" style="margin:2px 3px">打印</button><button type="button" class="btn btn-warning btn-xs" onclick="openTuihuo(\'' + row.id + "\'," + "'" + row.chukudanhao + "'" + "," + "'" + row.wldwName + "'" + "," + "'" + row.zhifu + "'" + "," + "'" + row.wanglaidanwei + "'" + ')">退货</button>'
                        }
                    }
                }
            }],
            onExpandRow: function (index, row, $Subdetail) {
                var prjLogBookProblemTable = $Subdetail.html('<table></table>').find('table');
                $(prjLogBookProblemTable).bootstrapTable({
                    url: path + '/chuku/sale/id.do', //请求后台的URL（*）
                    method: 'get', //请求方式（*）
                    //toolbar: false, //工具按钮用哪个容器
                    striped: true, //是否显示行间隔色
                    cache: false, //是否使用缓存，默认为true，所以一般情况下需要设置一下这个属性（*）
                    queryParams: {
                        id: row.id,
                    }, //传递参数（*）
                    showColumns: false,
                    height: 200,
                    //search: true, //是否显示表格搜索，此搜索是客户端搜索，不会进服务端，所以，个人感觉意义不大
                    strictSearch: false,
                    clickToSelect: true, //是否启用点击选中行
                    showColumns: false, // 开启自定义列显示功能
                    //showRefresh: true, //是否显示刷新按钮
                    //minimumCountColumns: 2, //最少允许的列数
                    //clickToSelect: true, //是否启用点击选中行
                    //height: 500, //行高，如果没有设置height属性，表格自动根据记录条数觉得表格高度
                    uniqueId: "ID", //每一行的唯一标识，一般为主键列
                    //showToggle: true, //是否显示详细视图和列表视图的切换按钮
                    cardView: false, //是否显示详细视图
                    detailView: false, //是否显示父子表
                    clickToSelect: true,
                    columns: [{
                        field: 'productName',
                        title: '商品名',
                        align: 'center',
                    }, {
                        field: 'productCode',
                        title: '商品编号',
                        align: 'center',
                    }, {
                        field: 'price',
                        title: '铭牌价/￥',
                        align: 'center',
                        formatter: function (value, row, index) {
                            if (value != "") {
                                return value.toFixed(2)
                            }
                        }
                    }, {
                        field: 'color',
                        title: '颜色',
                        align: 'center'
                    }, {
                        field: 'size',
                        title: '尺码',
                        align: 'center'
                    }, {
                        field: 'pinpai',
                        title: '商品品牌',
                        align: 'center'
                    }, {
                        field: 'lingshou',
                        title: '零售折扣',
                        align: 'center',
                        formatter: function (value, row, index) {
                            value = row.danjia / row.price
                            return value.toFixed(2)
                        }
                    }, {
                        field: 'shuliang',
                        title: '数量/件',
                        align: 'right',
                        formatter: function (value, row, index) {
                            return Math.abs(value)
                        }
                    }, {
                        field: 'danjia',
                        title: '实际单价',
                        align: 'right',
                        formatter: function (value, row, index) {
                            if (value != "") {
                                return value.toFixed(2)
                            }
                        }
                    }, {
                        field: 'zongjia',
                        title: '实际总价',
                        align: 'right',
                        formatter: function (value, row, index) {
                            value = row.shuliang * row.danjia;
                            return Math.abs(value).toFixed(2)
                        }
                    }]
                });
            }
        });
    }


    findXiaoshou();
    function findXiaoshou() {
        $.ajax({
            url: path + '/chuku/sale/findxiaoshou.do',
            dataType: 'json',
            success: function (data) {
                if (data.code == 200) {
                    $("#xiaoshou").text(data.data.toFixed(2));
                } else {
                    $("#xiaoshou").text('0.00');
                }
            }
        })
    }
    $(function () {
        $('#myTabs li:eq(0) a').tab('show');
    });
    var biaoji = "rem";
    function rems(tar) {
        biaoji = $(tar).parent().attr('class');
        var arr = biaoji.split(' ');
        biaoji = arr[0];
        $("#huiid").text("-1");
        $("#huiming").text("匿名");
    }

    function addcard() {
        sum = $('#myTab').children().length;
        sum = sum - 3;
        sum = $("#myTab").find('a').eq(sum).text() - 0;
        sum = sum + 1
        var title = '';
        title += '<li class="rem' + sum + '"><a onclick="rems(this)" href="#home'
            + sum + '" data-toggle="tab">' + sum + '</a></li>'
        var content = '';
        content += '<div style="max-height:' + _PageHeights + 'px" class="rem' + sum + ' tab-pane fade"  id="home' + sum + '"><div class="table-responsive"></div><div class="table-responsive2" ></div></div>'
        $("#title").before(title);
        $("#home").after(content);
        $('#myTab').find(".rem" + sum).eq(0).find("a").tab('show');
        biaoji = "rem" + sum;
    }
    function removecard() {
        var shu = $('#myTab').children().length;
        var zifu = $("." + biaoji).eq(1).text();
        if (shu <= 3) {
            $('#myModalg').modal('show');
            return;
        } else if (zifu.trim() != "") {
            $('#myModal').modal('show');
        } else {
            $("." + biaoji).remove();
            $('#myTab li:eq(0) a').tab('show');
            $('#myTab li:eq(0)').attr('class');
            biaoji = $('#myTab li:eq(0)').attr('class');
            var arr = biaoji.split(' ');
            biaoji = arr[0];
        }
    }
    function remove() {
        $('#myModal').modal('hide');
        $("." + biaoji).remove();
        $('#myTab li:eq(0) a').tab('show');
        $('#myTab li:eq(0)').attr('class');
        biaoji = $('#myTab li:eq(0)').attr('class');
        var arr = biaoji.split(' ');
        biaoji = arr[0];
    }

    var _PageHeight = document.documentElement.clientHeight
    $('#shang').css('min-height', _PageHeight - 225);
    $('#shang').css('max-height', _PageHeight - 225);
    var _PageWidth = document.documentElement.clientWidth
    $('#you').css('max-Width', _PageWidth - 410);
    $('#you').css('max-height', _PageHeight - 10);
    var _PageHeights = document.documentElement.clientHeight - 242
    $('#home').css('max-height', _PageHeights);
</script>